// import modelsPlugin from '../plugin/rollup-plugin-models';
import pluginExports from '../plugin/vite-plugin-exports';
import routerPlugin from '../plugin/vite-plugin-router';

export default async () => {
  const react = await import('@vitejs/plugin-react');
  const autoCssModules = await import('@ebonex/rollup-plugin-auto-css-modules');

  return {
    plugins: [
      pluginExports(),
      routerPlugin(),
      // modelsPlugin(),
      react.default(),
      autoCssModules.default(),
    ],
    resolve: {
      alias: {
        '@': '/src/',
        qps: '/src/.qps/exports.ts',
      },
    },
  };
};
